package speedball.skincenter;

import com.jfoenix.controls.JFXToggleButton;
import javafx.beans.value.ObservableValue;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Toggle;
import javafx.scene.control.ToggleGroup;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.Window;

public class SkinCenterStage extends Stage {

public SkinCenterStage(Window owner){
    initOwner(owner);
    initStyle(StageStyle.DECORATED);
    setTitle("皮肤中心");
    Group pane=new Group();
    pane.setStyle("-fx-background-color:#EEE; -fx-padding: 40;");
    JFXToggleButton toggleButton = new JFXToggleButton();

    toggleButton.setLayoutX(100D);
    toggleButton.setUserData("true");
    ToggleGroup group = new ToggleGroup();
    toggleButton.setText("New Skin");
    pane.getChildren().add(toggleButton);
    toggleButton.setToggleGroup(group);
    group.selectedToggleProperty().addListener((ObservableValue<? extends Toggle> ov, Toggle toggle, Toggle new_toggle) -> {
        if (new_toggle == null)
            System.out.println("false");
        else
            System.out.println(group.getSelectedToggle().getUserData());
    });




    pane.getChildren().add(new Button("fsdfsfs"));
    final Scene scene = new Scene(pane, 600, 400, Color.valueOf("#EEE"));
    setScene(scene);
}



}
